package main.pojo;

import java.util.Date;

/**
 * 菜品
 *
 * @TableName DISH
 */

public class Dish {
    /**
     * 主键
     */
    private String id;

    /**
     * 菜品名称
     */
    private String name;

    /**
     * 菜品一级分类
     */
    private String categoryOne;

    /**
     * 菜品价格
     */
    private String price;

    /**
     * 描述
     */
    private String description;

    /**
     * 状态 1 在售 2 售罄
     */
    private String status;

    /**
     * 排序
     */
    private String sort;

    /**
     * 创建者
     */
    private String creator;

    /**
     * 创建时间
     */
    private Date createDate;

    /**
     * 更新者
     */
    private String updater;

    /**
     * 更新时间
     */
    private Date updateDate;

    /**
     * 菜品二级分类
     */
    private String categoryTwo;

    public Dish(String id, String name, String categoryOne, String price, String description, String status, String sort, String creator, Date createDate, String updater, Date updateDate, String two, String categoryTwo) {
        this.id = id;
        this.name = name;
        this.categoryOne = categoryOne;
        this.price = price;
        this.description = description;
        this.status = status;
        this.sort = sort;
        this.creator = creator;
        this.createDate = createDate;
        this.updater = updater;
        this.updateDate = updateDate;
        this.categoryTwo = categoryTwo;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCategoryOne() {
        return categoryOne;
    }

    public void setCategoryOne(String categoryOne) {
        this.categoryOne = categoryOne;
    }

    public String getPrice() {
        return price;
    }

    public void setPrice(String price) {
        this.price = price;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getSort() {
        return sort;
    }

    public void setSort(String sort) {
        this.sort = sort;
    }

    public String getCreator() {
        return creator;
    }

    public void setCreator(String creator) {
        this.creator = creator;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public String getUpdater() {
        return updater;
    }

    public void setUpdater(String updater) {
        this.updater = updater;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    public String getCategoryTwo() {
        return categoryTwo;
    }

    public void setCategoryTwo(String categoryTwo) {
        this.categoryTwo = categoryTwo;
    }


    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Dish dish = (Dish) o;

        if (id != null ? !id.equals(dish.id) : dish.id != null) return false;
        if (name != null ? !name.equals(dish.name) : dish.name != null) return false;
        if (categoryOne != null ? !categoryOne.equals(dish.categoryOne) : dish.categoryOne != null) return false;
        if (price != null ? !price.equals(dish.price) : dish.price != null) return false;
        if (description != null ? !description.equals(dish.description) : dish.description != null) return false;
        if (status != null ? !status.equals(dish.status) : dish.status != null) return false;
        if (sort != null ? !sort.equals(dish.sort) : dish.sort != null) return false;
        if (creator != null ? !creator.equals(dish.creator) : dish.creator != null) return false;
        if (createDate != null ? !createDate.equals(dish.createDate) : dish.createDate != null) return false;
        if (updater != null ? !updater.equals(dish.updater) : dish.updater != null) return false;
        if (updateDate != null ? !updateDate.equals(dish.updateDate) : dish.updateDate != null) return false;
        return categoryTwo != null ? categoryTwo.equals(dish.categoryTwo) : dish.categoryTwo == null;
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (name != null ? name.hashCode() : 0);
        result = 31 * result + (categoryOne != null ? categoryOne.hashCode() : 0);
        result = 31 * result + (price != null ? price.hashCode() : 0);
        result = 31 * result + (description != null ? description.hashCode() : 0);
        result = 31 * result + (status != null ? status.hashCode() : 0);
        result = 31 * result + (sort != null ? sort.hashCode() : 0);
        result = 31 * result + (creator != null ? creator.hashCode() : 0);
        result = 31 * result + (createDate != null ? createDate.hashCode() : 0);
        result = 31 * result + (updater != null ? updater.hashCode() : 0);
        result = 31 * result + (updateDate != null ? updateDate.hashCode() : 0);
        result = 31 * result + (categoryTwo != null ? categoryTwo.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return "Dish{" +
                "id='" + id + '\'' +
                ", name='" + name + '\'' +
                ", categoryOne='" + categoryOne + '\'' +
                ", price=" + price +
                ", description='" + description + '\'' +
                ", status=" + status +
                ", sort=" + sort +
                ", creator='" + creator + '\'' +
                ", createDate=" + createDate +
                ", updater='" + updater + '\'' +
                ", updateDate=" + updateDate +
                ", categoryTwo='" + categoryTwo + '\'' +
                '}';
    }

}